import { GUIComponent } from "../../../../com/mui/controls/GUIComponent";
import { SecTimer } from "../../../../com/gengine/core/frame/SecTimer";
import { GButton } from "../../../../com/mui/controls/GButton";
import { Language } from "../../../../extend/language/Language";
import { FilterConst } from "../../../component/gconst/FilterConst";
import { ObjCreate } from "../common/ObjCreate";
import { Dispatcher } from "../../../mvc/core/Dispatcher";
import { DataEvent } from "../../events/DataEvent";
import { EventName } from "../../mvc/EventName";
import { GameMapUtil } from "../../scene/map/GameMapUtil";
import { DisplayUtil } from "../../../common/DisplayUtil";
import { Cache } from "../../cache/Cache";
import { RolePlayer } from "../../scene/player/entity/RolePlayer";
import { CopyConfig } from "../../resource/CopyConfig";
import { MapFileUtil } from "../../scene/map/MapFileUtil";
import { GameDefConfig } from "../../resource/GameDefConfig";
import { ColorConfig } from "../../resource/ColorConfig";
import { ECamp } from "../../../../Message/Public/ECamp";
import { ResouceConst } from "../../../component/gconst/ResouceConst";
import { ImagesConst } from "../../resource/ImagesConst";
import { GLabel } from "../../../../com/mui/controls/GLabel";
import { GTextFormat } from "../../../common/GTextFormat";
import { FontUtil } from "../../../common/font/FontUtil";
import { EntityType } from "../../rules/EntityType";
import { SPublicMiniPlayer } from "../../../../Message/Public/SPublicMiniPlayer";
import { PlayerMiniInfo } from "../../model/PlayerMiniInfo";
import { PlayerOpRegister } from "../common/menu/PlayerOpRegister";
import { Global } from "../../../../com/gengine/global/Global";
import { SEntityKillerInfo } from "../../../../Message/Public/SEntityKillerInfo";
import { ECopyType } from "../../../../Message/Public/ECopyType";
import { TimerType } from "../../../../com/gengine/core/frame/TimerType";
import { ScaleBitmap } from "../../../../com/mui/display/ScaleBitmap";
import { GCheckBox } from "../../../../com/mui/controls/GCheckBox";
type int = number;
//class RelivePanel
    
    export  class RelivePanel extends GUIComponent
    {
        constructor()
        {
            super();
            this._timer = new SecTimer(1, this._secs);
            this.initView();
            return;
        }

        /* internal  */onBuyPropChangeHandler(arg1: Object /* flash.events.Event */): void
        {
            if (this._buyPropCb.selected) 
            {
                this._isAutoBuy = true;
            }
            else 
            {
                this._isAutoBuy = false;
            }
            return;
        }

        protected createMLevelBtn(): void
        {
            if (this._propReliveBtn == null) 
            {
                this._propReliveBtn = new GButton();
                this._propReliveBtn.label = Language.getString(20803);
                this._propReliveBtn.width = 80;
                this._propReliveBtn.height = 25;
                this._propReliveBtn.styleName = "Button";
                this._propReliveBtn.textField.filters = [FilterConst.glowFilter];
            }
            this._propReliveBtn.x = 105;
            this._propReliveBtn.y = 55;
            this._propReliveBtn.addEventListener(flash.events.MouseEvent.CLICK, this.onPropRelive, false, 0, true);
            addChild(this._propReliveBtn);
            if (this._cityReliveBtn == null) 
            {
                this._cityReliveBtn = new GButton();
                this._cityReliveBtn.label = Language.getString(20804);
                this._cityReliveBtn.width = 80;
                this._cityReliveBtn.height = 25;
                this._cityReliveBtn.styleName = "Button";
                this._cityReliveBtn.textField.filters = [FilterConst.glowFilter];
            }
            this._cityReliveBtn.x = 105;
            this._cityReliveBtn.y = 88;
            this._cityReliveBtn.addEventListener(flash.events.MouseEvent.CLICK, this.onCityRelive, false, 0, true);
            addChild(this._cityReliveBtn);
            if (this._buyPropCb == null) 
            {
                this._buyPropCb = ObjCreate.createCheckBox(Language.getString(20805), 50, 115, 250, 20, this);
                this._buyPropCb.selected = false;
                this._isAutoBuy = false;
            }
            this._buyPropCb.addEventListener(flash.events.Event.CHANGE, this.onBuyPropChangeHandler);
            addChild(this._buyPropCb);
            return;
        }

        /* internal  */createCopyBtn(): void
        {
            if (this._cityReliveBtn == null) 
            {
                this._cityReliveBtn = new GButton();
                this._cityReliveBtn.label = Language.getString(20804);
                this._cityReliveBtn.width = 80;
                this._cityReliveBtn.height = 25;
                this._cityReliveBtn.styleName = "Button";
                this._cityReliveBtn.textField.filters = [FilterConst.glowFilter];
            }
            this._cityReliveBtn.x = 105;
            this._cityReliveBtn.y = 80;
            this._cityReliveBtn.addEventListener(flash.events.MouseEvent.CLICK, this.onCityRelive, false, 0, true);
            addChild(this._cityReliveBtn);
            if (this.isSeventyCopyFloorRelive()) 
            {
                this._cityReliveBtn.x = 60;
                this._cityReliveBtn.y = 105;
                if (this._seventyBackReliveBtn == null) 
                {
                    this._seventyBackReliveBtn = ObjCreate.createGButton(Language.getString(20816), 165, 105, 75, 25);
                }
                this._seventyBackReliveBtn.addEventListener(flash.events.MouseEvent.CLICK, this.onSeventyBackRelive, false, 0, true);
                addChild(this._seventyBackReliveBtn);
            }
            return;
        }

        /* internal  */createKingChampionShipMode(): void
        {
            if (this._cityReliveBtn == null) 
            {
                this._cityReliveBtn = new GButton();
                this._cityReliveBtn.label = Language.getString(20804);
                this._cityReliveBtn.width = 80;
                this._cityReliveBtn.height = 25;
                this._cityReliveBtn.styleName = "Button";
                this._cityReliveBtn.textField.filters = [FilterConst.glowFilter];
            }
            this._cityReliveBtn.x = 105;
            this._cityReliveBtn.y = 80;
            this._cityReliveBtn.addEventListener(flash.events.MouseEvent.CLICK, this.onCityRelive, false, 0, true);
            addChild(this._cityReliveBtn);
            return;
        }

        protected removeSLevelBtn(): void
        {
            if (this._localReliveBtn) 
            {
                if (this.contains(this._localReliveBtn)) 
                {
                    removeChild(this._localReliveBtn);
                }
                this._localReliveBtn.removeEventListener(flash.events.MouseEvent.CLICK, this.onLocalRelive);
            }
            return;
        }

        /* internal  */createArenaBtn(): void
        {
            if (!this._enterMatchMode) 
            {
                this._enterMatchMode = ObjCreate.createGButton(Language.getString(20819), 105, 88, 95, 25, null, "Button");
            }
            this.addChild(this._enterMatchMode);
            this._enterMatchMode.addEventListener(flash.events.MouseEvent.CLICK, this.onCityRelive, false, 0, true);
            return;
        }

        /* internal  */createGuildWarBtn(): void
        {
            if (this._propReliveBtn == null) 
            {
                this._propReliveBtn = new GButton();
                this._propReliveBtn.label = Language.getString(20803);
                this._propReliveBtn.width = 80;
                this._propReliveBtn.height = 25;
                this._propReliveBtn.styleName = "Button";
                this._propReliveBtn.textField.filters = [FilterConst.glowFilter];
            }
            this._propReliveBtn.x = 105;
            this._propReliveBtn.y = 80;
            this._propReliveBtn.addEventListener(flash.events.MouseEvent.CLICK, this.onPropRelive, false, 0, true);
            addChild(this._propReliveBtn);
            return;
        }

        /* internal  */showFuHuoDianFuHuoBtn(): void
        {
            if (this._cityReliveBtn == null) 
            {
                this._cityReliveBtn = new GButton();
                this._cityReliveBtn.label = Language.getString(20804);
                this._cityReliveBtn.width = 80;
                this._cityReliveBtn.height = 25;
                this._cityReliveBtn.styleName = "Button";
                this._cityReliveBtn.textField.filters = [FilterConst.glowFilter];
            }
            this._cityReliveBtn.x = 105;
            this._cityReliveBtn.y = 88;
            this._cityReliveBtn.addEventListener(flash.events.MouseEvent.CLICK, this.onCityRelive, false, 0, true);
            addChild(this._cityReliveBtn);
            return;
        }

        public continueTime(): void
        {
            this._timer.start();
            return;
        }

        /* internal  */onTimerComplete(arg1: SecTimer): void
        {
            var timer: SecTimer;

            var loc1;
            timer = arg1;
            this._timer.stop();
            if (this.isSeventyCopyFloorRelive()) 
            {
                Dispatcher.dispatchEvent(new DataEvent(EventName.CopySeventyCopyRevive, -1));
            }
            else if (GameMapUtil.curMapState.isRobFlag) 
            {
                DisplayUtil.setEnabled(this._cityReliveBtn, true);
                Dispatcher.dispatchEvent(new DataEvent(EventName.RobFlagAutoReliveReq));
            }
            else if (GameMapUtil.curMapState.isCrossSpiritWarCopyCode) 
            {
                DisplayUtil.setEnabled(this._cityReliveBtn, true);
                flash.utils.setTimeout((): void
                {
                    Dispatcher.dispatchEvent(new DataEvent(EventName.Role_Relive_City));
                    return;
                }, 5000)
            }
            else if (this._sEntityKillerInfo && (this._sEntityKillerInfo.waitSec > 0 || this._sEntityKillerInfo.waitSec >= 0 && Cache.instance.copy.isIn80DefendCopy())) 
            {
                if (this._propReliveBtn) 
                {
                    this._propReliveBtn.enabled = true;
                }
                if (this._cityReliveBtn) 
                {
                    this._cityReliveBtn.enabled = true;
                }
                if (!Cache.instance.copy.isIn80DefendCopy()) 
                {
                    Dispatcher.dispatchEvent(new DataEvent(EventName.CDMapTimerComplete, this._sEntityKillerInfo));
                }
            }
            else if (Cache.instance.bossField.isBoss() || Cache.instance.bossField.isCrossBoss()) 
            {
                Dispatcher.dispatchEvent(new DataEvent(EventName.BossFieldBossRevive));
            }
            else 
            {
                Dispatcher.dispatchEvent(new DataEvent(EventName.Role_Relive_City));
            }
            return;
        }

        /* internal  */onEnterFrameHandler(arg1: SecTimer=null): void
        {
            var loc2=null;
            var loc3=0;
            var loc4=null;
            var loc5=null;
            var loc6=0;
            var loc7=null;
            var loc8=null;
            var loc9=0;
            if (RolePlayer.instance.isDead == false) 
            {
                Dispatcher.dispatchEvent(new DataEvent(EventName.Role_Relive_HideRelivePanel));
                return;
            }
            if (this.isSeventyCopyFloorRelive()) 
            {
                if (CopyConfig.instance.isReviveLimit(MapFileUtil.mapID)) 
                {
                    loc2 = "<font size=\'12\' color=\'#ffffff\'><p align=\'center\'>";
                    loc2 = loc2 + Language.getStringByParam(20817, "<font color=\'#ff0000\'>" + this._sEntityKillerInfo.name + "</font>", Cache.instance.copy.seventyCopyReviveTime);
                    loc2 = loc2 + "</p></font>";
                    this._descLabel.y = 12;
                    this._descLabel.htmlText = loc2;
                    this._timer.stop();
                    return;
                }
            }
            var loc1="<font size=\'12\' color=\'#ffffff\'><p align=\'center\'>";
            if (this._sEntityKillerInfo == null) 
            {
                loc1 = loc1 + ("<font color=\'#ffffff\'>" + Language.getString(20808) + "</font>\n");
            }
            else 
            {
                loc3 = this._sEntityKillerInfo.camp;
                loc4 = GameDefConfig.instance.getECamp(loc3);
                loc5 = ColorConfig.instance.getCountryColor(loc3).color;
                if (GameMapUtil.isNewBattlefield()) 
                {
                    loc6 = this._sEntityKillerInfo.force;
                    loc7 = Cache.instance.newBattlefield.getForceColor(loc6).color;
                    loc1 = loc1 + Language.getStringByParam(20806, Cache.instance.newBattlefield.getForceHtmlText(loc6) + "<a href=\'event: 0\'><u><font color=\'#ff0000\'>(" + this._sEntityKillerInfo.name + ")</font></u></a><font color=\'" + loc7 + "\'> (" + this._sEntityKillerInfo.level + Language.getString(20807) + ") </font>\n");
                }
                else if (GameMapUtil.isCrossBossField()) 
                {
                    if (loc8 = GameDefConfig.instance.getItem("crossBossField", this._sEntityKillerInfo.force)) 
                    {
                        loc1 = loc1 + Language.getStringByParam(20806, "<font color=\'" + loc8.text1 + "\'> (" + loc8.name + ") </font>" + "<a href=\'event: 0\'><u><font color=\'#ff0000\'>(" + this._sEntityKillerInfo.name + ")</font></u></a><font color=\'" + loc5 + "\'> (" + this._sEntityKillerInfo.level + Language.getString(20807) + ") </font>\n");
                    }
                }
                else if (Cache.instance.copy.isInSeventyCopyWhichFloor() == 2 && CopyConfig.instance.isReviveLimit(MapFileUtil.mapID) && Cache.instance.copy.seventyCopyReviveTime <= 0) 
                {
                    loc1 = loc1 + (Language.getString(20815) + "\n");
                }
                else if (loc3 == ECamp._ECampOne || loc3 == ECamp._ECampTwo || loc3 == ECamp._ECampThree) 
                {
                    loc1 = loc1 + Language.getStringByParam(20806, "<font color=\'" + loc5 + "\'> (" + loc4 + ") </font>" + "<a href=\'event: 0\'><u><font color=\'#ff0000\'>(" + this._sEntityKillerInfo.name + ")</font></u></a><font color=\'" + loc5 + "\'> (" + this._sEntityKillerInfo.level + Language.getString(20807) + ") </font>\n");
                }
                else if (this._sEntityKillerInfo.name && !(this._sEntityKillerInfo.name == "")) 
                {
                    loc1 = loc1 + Language.getStringByParam(20806, "<font color=\'#ff0000\'> (" + this._sEntityKillerInfo.name + ")<font color=\'" + loc5 + "\'> (" + this._sEntityKillerInfo.level + Language.getString(20807) + ") </font> </font>\n");
                }
                else 
                {
                    loc1 = loc1 + ("<font color=\'#ffffff\'>" + Language.getString(20808) + "</font>\n");
                }
            }
            if (this._timer) 
            {
                loc1 = loc1 + ("<font color=\'#ff2929\'>" + (this._timer.repeatCount > 0 ? this._timer.repeatCount : 0) + "</font>");
            }
            else 
            {
                loc1 = loc1 + ("<font color=\'#ff2929\'>" + this._secs + "</font>");
            }
            if (this._timer && this._sEntityKillerInfo && this._sEntityKillerInfo.waitSec > 0) 
            {
                loc9 = 20818;
                if (Cache.instance.bossField.isBoss() || Cache.instance.bossField.isCrossBoss()) 
                {
                    loc9 = 20820;
                    if (this._cityReliveBtn) 
                    {
                        this._cityReliveBtn.enabled = false;
                    }
                }
                else 
                {
                    loc9 = 20818;
                    if (this._propReliveBtn) 
                    {
                        this._propReliveBtn.enabled = false;
                    }
                }
                loc1 = loc1 + ("<font color=\'#f5ff00\'> " + Language.getString(loc9) + "</font></p>\n");
            }
            else 
            {
                if (this._propReliveBtn) 
                {
                    this._propReliveBtn.enabled = true;
                }
                if (this._cityReliveBtn) 
                {
                    this._cityReliveBtn.enabled = true;
                }
                if (Cache.instance.copy.isInRobFlagCopy() || GameMapUtil.curMapState.isCrossSpiritWarCopyCode) 
                {
                    DisplayUtil.setEnabled(this._cityReliveBtn, false);
                }
                loc1 = loc1 + ("<font color=\'#f5ff00\'> " + Language.getString(20809) + "</font></p>\n");
            }
            if (this._level < 20) 
            {
                loc1 = loc1 + ("<font size=\'13\'><font color=\'#00ff00\'>\t20</font>" + Language.getString(20810) + "</font>\n");
                loc1 = loc1 + ("<font size=\'13\'><font color=\'#00ff00\'>\t20</font>" + Language.getString(20811) + "</font></font>");
            }
            else 
            {
                loc1 = loc1 + "</font></p>";
            }
            this._descLabel.y = 17;
            this._descLabel.htmlText = loc1;
            return;
        }

        public get isAutoBuy(): Boolean
        {
            if (this._buyPropCb == null) 
            {
                return false;
            }
            return this._buyPropCb.selected;
        }

        protected initView(): void
        {
            setSize(330, 115);
            this.scaleBg = ResouceConst.getScaleBitmap(ImagesConst.WindowCenterB);
            this.scaleBg.x = 0;
            this.scaleBg.y = 0;
            this.scaleBg.width = 300;
            this.scaleBg.height = 140;
            this.addChild(this.scaleBg);
            this._descLabel = new GLabel();
            this._descLabel.x = 8;
            this._descLabel.y = 17;
            this._descLabel.width = 290;
            this._descLabel.height = 130;
            this._descLabel.textField.addEventListener(flash.events.TextEvent.LINK, this.onTextLinkHandler);
            this._descLabel.textField.addEventListener(flash.events.MouseEvent.CLICK, this.onClickHandler);
            addChild(this._descLabel);
            this._descLabel.textField.defaultTextFormat = new GTextFormat(FontUtil.songtiName, 12, null, null, null, null, null, null, null, null, null, null, 5);
            return;
        }

        /* internal  */onTextLinkHandler(arg1: Object /* flash.events.TextEvent */): void
        {
            var loc1=null;
            var loc2=null;
            if (!(this._sEntityKillerInfo == null) && this._sEntityKillerInfo.entityId.type == EntityType.Player) 
            {
                loc1 = new SPublicMiniPlayer();
                loc1.entityId = this._sEntityKillerInfo.entityId;
                loc1.camp = this._sEntityKillerInfo.camp;
                loc1.name = this._sEntityKillerInfo.name;
                loc1.level = this._sEntityKillerInfo.level;
                loc1.online = 1;
                loc2 = new PlayerMiniInfo(loc1);
                PlayerOpRegister.ShowOpList(loc2, Global.stage.mouseX, Global.stage.mouseY);
            }
            return;
        }

        /* internal  */onClickHandler(arg1: Object /* flash.events.MouseEvent */): void
        {
            arg1.stopImmediatePropagation();
            return;
        }

        public update(arg1: int, arg2: SEntityKillerInfo): void
        {
            this._sEntityKillerInfo = arg2;
            this._level = arg1;
            if (arg1 < 20) 
            {
                this.removeMLevelBtn();
                this.createSLevelBtn();
            }
            else 
            {
                this.removeSLevelBtn();
                this.removeMLevelBtn();
                if (GameMapUtil.isArena() || GameMapUtil.curMapState.isGangFights) 
                {
                    this.createArenaBtn();
                }
                else if (GameMapUtil.isGuildWar() || GameMapUtil.curMapState.isCrossGuildWar) 
                {
                    this.createGuildWarBtn();
                }
                else if (GameMapUtil.curMapState.isRobFlag || GameMapUtil.curMapState.isCrossSpiritWarCopyCode) 
                {
                    this.showFuHuoDianFuHuoBtn();
                    DisplayUtil.setEnabled(this._cityReliveBtn, false);
                }
                else if (GameMapUtil.isCopyMap(MapFileUtil.mapID) && !Cache.instance.copy.checkIsCanReliveByProp() && !this.isSeventyCopyFloorRelive() && !GameMapUtil.curMapState.isCrossSea && !Cache.instance.copy.isInCopyType(ECopyType._ECopyPlough) || Cache.instance.copy.isInKingCopy() || Cache.instance.bossField.isBoss() || Cache.instance.bossField.isCrossBoss() || GameMapUtil.curMapState.isCrossSecret || GameMapUtil.curMapState.isDominionCopy || Cache.instance.copy.isInUpgradeCrossSecretCopy() || Cache.instance.copy.isHeroBattleCopy()) 
                {
                    this.createCopyBtn();
                }
                else if (GameMapUtil.curMapState.isKingChampionShip) 
                {
                    this.createKingChampionShipMode();
                }
                else 
                {
                    this.createMLevelBtn();
                }
            }
            if (this._timer.running == false) 
            {
                this._timer.addListener(TimerType.ENTERFRAME, this.onEnterFrameHandler);
                this._timer.addListener(TimerType.COMPLETE, this.onTimerComplete);
                this._timer.stop();
                this._timer.reset();
                if (GameMapUtil.isGuildWar()) 
                {
                    this._timer.repeatCount = 20;
                }
                else if (GameMapUtil.curMapState.isRobFlag || GameMapUtil.curMapState.isCrossSpiritWarCopyCode) 
                {
                    this._timer.repeatCount = 10;
                }
                else if (GameMapUtil.curMapState.isCrossGuildWar) 
                {
                    this._timer.repeatCount = 10;
                }
                else if (this._sEntityKillerInfo && (this._sEntityKillerInfo.waitSec > 0 || this._sEntityKillerInfo.waitSec >= 0 && Cache.instance.copy.isIn80DefendCopy())) 
                {
                    this._timer.repeatCount = this._sEntityKillerInfo.waitSec;
                    if (Cache.instance.copy.isIn80DefendCopy() && this._cityReliveBtn) 
                    {
                        this._cityReliveBtn.enabled = false;
                    }
                }
                else 
                {
                    this._timer.repeatCount = this._secs;
                }
                this._timer.start();
                this.onEnterFrameHandler();
            }
            return;
        }

        public stageResize(): void
        {
            this.x = (Global.stage.stageWidth - this.width) / 2;
            this.y = (Global.stage.stageHeight - this.height) / 2;
            return;
        }

        public reset(): void
        {
            this._timer.stop();
            this._timer.dispose();
            return;
        }

        public /* override */ dispose(arg1: Boolean=true): void
        {
            this.reset();
            super.dispose(arg1);
            return;
        }

        protected createSLevelBtn(): void
        {
            if (this._localReliveBtn == null) 
            {
                this._localReliveBtn = new GButton();
                this._localReliveBtn.label = Language.getString(20803);
                this._localReliveBtn.height = 25;
                this._localReliveBtn.styleName = "Button";
                this._localReliveBtn.textField.filters = [FilterConst.glowFilter];
            }
            this._localReliveBtn.x = 105;
            this._localReliveBtn.y = 110;
            this._localReliveBtn.addEventListener(flash.events.MouseEvent.CLICK, this.onLocalRelive, false, 0, true);
            addChild(this._localReliveBtn);
            return;
        }

        /* internal  */isSeventyCopyFloorRelive(): Boolean
        {
            if (Cache.instance.copy.isInSeventyCopyWhichFloor() == 2) 
            {
                if (CopyConfig.instance.isReviveLimit(MapFileUtil.mapID)) 
                {
                    if (Cache.instance.copy.seventyCopyReviveTime > 0) 
                    {
                        return true;
                    }
                }
                else 
                {
                    return true;
                }
            }
            return false;
        }

        protected removeMLevelBtn(): void
        {
            if (this._propReliveBtn) 
            {
                if (this.contains(this._propReliveBtn)) 
                {
                    removeChild(this._propReliveBtn);
                }
                this._propReliveBtn.removeEventListener(flash.events.MouseEvent.CLICK, this.onPropRelive);
            }
            if (this._cityReliveBtn) 
            {
                if (this.contains(this._cityReliveBtn)) 
                {
                    removeChild(this._cityReliveBtn);
                }
                this._cityReliveBtn.removeEventListener(flash.events.MouseEvent.CLICK, this.onCityRelive);
            }
            if (this._seventyBackReliveBtn) 
            {
                if (this.contains(this._seventyBackReliveBtn)) 
                {
                    removeChild(this._seventyBackReliveBtn);
                }
                this._seventyBackReliveBtn.removeEventListener(flash.events.MouseEvent.CLICK, this.onSeventyBackRelive);
            }
            if (this._enterMatchMode && this._enterMatchMode.parent) 
            {
                this._enterMatchMode.parent.removeChild(this._enterMatchMode);
                this._enterMatchMode.removeEventListener(flash.events.MouseEvent.CLICK, this.onCityRelive);
            }
            if (this._buyPropCb && this._buyPropCb.parent) 
            {
                this._buyPropCb.removeEventListener(flash.events.Event.CHANGE, this.onBuyPropChangeHandler);
                removeChild(this._buyPropCb);
            }
            return;
        }

        /* internal  */onIngotRelive(arg1: Object /* flash.events.MouseEvent */): void
        {
            Dispatcher.dispatchEvent(new DataEvent(EventName.Role_Relive_Coin));
            return;
        }

        /* internal  */onLocalRelive(arg1: Object /* flash.events.MouseEvent */=null): void
        {
            Dispatcher.dispatchEvent(new DataEvent(EventName.Role_Relive_Local));
            return;
        }

        /* internal  */onPropRelive(arg1: Object /* flash.events.MouseEvent */=null): void
        {
            Dispatcher.dispatchEvent(new DataEvent(EventName.Role_Relive_PropLocal));
            return;
        }

        /* internal  */onCityRelive(arg1: Object /* flash.events.MouseEvent */=null): void
        {
            if (Cache.instance.bossField.isBoss() || Cache.instance.bossField.isCrossBoss()) 
            {
                Dispatcher.dispatchEvent(new DataEvent(EventName.BossFieldBossRevive));
            }
            else if (this.isSeventyCopyFloorRelive()) 
            {
                Dispatcher.dispatchEvent(new DataEvent(EventName.CopySeventyCopyRevive, -1));
            }
            else 
            {
                Dispatcher.dispatchEvent(new DataEvent(EventName.Role_Relive_City));
            }
            return;
        }

        /* internal  */onSeventyBackRelive(arg1: Object /* flash.events.MouseEvent */): void
        {
            Dispatcher.dispatchEvent(new DataEvent(EventName.CopySeventyCopyRevive, 0));
            return;
        }

        /* internal  */onBindingIngotRelive(arg1: Object /* flash.events.MouseEvent */): void
        {
            Dispatcher.dispatchEvent(new DataEvent(EventName.Role_Relive_CoinBind));
            return;
        }

        protected /* var */scaleBg: ScaleBitmap;

        protected /* var */_descLabel: GLabel;

        protected /* var */_localReliveBtn: GButton;

        protected /* var */_propReliveBtn: GButton;

        protected /* var */_enterMatchMode: GButton;

        protected /* var */_seventyBackReliveBtn: GButton;

        /* internal */ /* var */_buyPropCb: GCheckBox;

        /* internal */ /* var */_secs: int=120;

        /* internal */ /* var */_timer: SecTimer;

        /* internal */ /* var */_isAutoBuy: Boolean=false;

        /* internal */ /* var */_level: int;

        /* internal */ /* var */_sEntityKillerInfo: SEntityKillerInfo;

        protected /* var */_cityReliveBtn: GButton;

        /* internal */ /* var */_newinfo: SEntityKillerInfo;
    }
